<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head(title)">
    <meta charset="UTF-8">
    <meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <title th:replace="${title}">博客详情</title>
    <link rel="shortcut icon" th:href="@{/favicon.ico}" >
    <link rel="bookmark" th:href="@{/favicon.ico}" >
    <link th:href="@{/css/semantic.min.css}" rel="stylesheet">
    <link th:href="@{/css/style.css}" rel="stylesheet">
    <link th:href="@{/lib/prism/prism.css}" rel="stylesheet">
    <link th:href="@{/lib/typo/typo.css}" rel="stylesheet">
    <link th:href="@{/lib/tocbot/tocbot.css}" rel="stylesheet">
</head>
<body>

<!--导航 -->
<nav th:fragment="menu(0)" class="ui inverted attached segment m-padding-tb-mini m-shadow-small" style="border: none">
    <div class="ui container m-nav-container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui teal header item">CodeMan丶</h2>
            <a href="#" th:href="@{/}" class="m-item item m-mobile-hide" th:classappend="${n == 1}?'active':''"><i class="home mini icon m-icon"></i>首页</a>
            <a href="#" th:href="@{/types/-1}" class="m-item item m-mobile-hide" th:classappend="${n == 2}?'active':''"><i class="idea mini icon m-icon"></i>分类</a>
            <a href="#" th:href="@{/tags/-1}" class="m-item item m-mobile-hide" th:classappend="${n == 3}?'active':''"><i class="tags mini icon m-icon"></i>标签</a>
            <a href="#" th:href="@{/archive}" class="m-item item m-mobile-hide" th:classappend="${n == 4}?'active':''"><i class="clone mini icon m-icon"></i>归档</a>
            <a href="#" th:href="@{/about}" class="m-item item m-mobile-hide" th:classappend="${n == 5}?'active':''"><i class="info mini icon m-icon"></i>关于本站</a>
            <div class="right m-item item m-mobile-hide">
                <form name="search" action="#" method="get" th:action="@{/search}" target="_blank">
                <div class="ui transparent inverted icon input">
                    <input type="text" name="query" placeholder="Search...">
                    <i onclick="document.forms['search'].submit()" class="search link icon"></i>
                </div>
                </form>
            </div>
        </div>
    </div>
    <div class="ui menu toggle black icon button m-right-top m-mobile-show">
        <i class="sidebar icon"></i>
    </div>
</nav>

<!-- 底部footer -->
<footer th:fragment="footer" class="ui inverted vertical segment m-margin-top-small">
    <div id="footer-container" class="ui center aligned container">
        <div th:fragment="footerInfo">
            <div class="ui stackable inverted divided grid m-padding-tb-big">
                <div class="three wide column">
                    <div class="ui item">
                        <img th:src="${avatar}" src="" alt="" class="ui rounded image m-inline-block" style="width: 100px;">
                    </div>
                </div>
                <div class="three wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced">最新博客</h4>
                    <div class="ui inverted link list">
                        <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" class="item" th:each="blog:${newblog}" th:text="${blog.title}">用户故事{ user story }</a>
                    </div>
                </div>
                <div class="three wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced">联系我</h4>
                    <div class="ui inverted link list">
                        <a href="#" class="item">邮箱: <span th:text="${email}"></span></a>
                        <a href="#" class="item">QQ: 531639577</a>
                        <a href="#" class="item">地址: 重庆市渝北区</a>
                    </div>
                </div>
                <div class="seven wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced">CodeMan丶</h4>
                    <p class="m-text-thin m-text-spaced m-opacity-mini">坚持写博客，坚持学习，不放弃，不懈怠。</p>
                </div>
            </div>
            <div class="ui inverted selection divider"></div>
            <p class="m-text-thin m-text-spaced m-opacity-tiny">Copyright © 2020 - 2021 Mr.Peng <a href="#" th:href="@{/admin}">管理员入口</a></p>
            <div class="ali-report-wrap">
                <img class="ali-report-img" src="//img.alicdn.com/tfs/TB1..50QpXXXXX7XpXXXXXXXXXX-40-40.png">
                <a class="link" href="http://www.beian.miit.gov.cn/" target="_blank">
                    <span >渝ICP备19017104号-1</span>
                </a>
            </div>
        </div>
    </div>
</footer>

<th:block th:fragment="script">
    <script th:src="@{/js/jquery.min.js}"></script>
    <script th:src="@{/js/semantic.min.js}"></script>
    <script th:src="@{/lib/prism/prism.js}"></script>
    <script th:src="@{/lib/tocbot/tocbot.min.js}"></script>
    <script th:src="@{/lib/qrcode/qrcode.js}"></script>
    <script th:src="@{/lib/toTop/jquery.toTop.min.js}"></script>
    <script>
        $("#footer-container").load(/*[[@{/footerInfo}]]*/"/footerInfo");

        function searchBlog() {
            console.log("search")
        }
    </script>
</th:block>

</body>
</html>